package com.bearsadmin.dto;

import lombok.Data;

import jakarta.validation.constraints.Email;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Pattern;
import jakarta.validation.constraints.Size;
import java.time.LocalDate;

/**
 * 用户创建DTO
 *
 * @author Bears Admin
 * @since 1.0.0
 */
@Data
public class UserCreateDTO {

    /**
     * 用户名
     */
    @NotBlank(message = "用户名不能为空")
    @Size(min = 3, max = 20, message = "用户名长度在3到20个字符")
    private String username;

    /**
     * 密码
     */
    @NotBlank(message = "密码不能为空")
    @Size(min = 6, max = 20, message = "密码长度在6到20个字符")
    private String password;

    /**
     * 邮箱
     */
    @Email(message = "邮箱格式不正确")
    private String email;

    /**
     * 手机号
     */
    @Pattern(regexp = "^1[3-9]\\d{9}$", message = "手机号格式不正确")
    private String phone;

    /**
     * 角色 (0-管理员, 1-普通用户)
     */
    private Integer role = 1;

    /**
     * 状态 (0-禁用, 1-正常)
     */
    private Integer status = 1;

    /**
     * 性别 (0-未知, 1-男, 2-女)
     */
    private Integer gender = 0;

    /**
     * 生日
     */
    private LocalDate birthday;

    /**
     * 备注
     */
    private String remark;
}